<?php

class DisplayCompare{
	
	public static function DisplayDevice($pListOfDevice, $pKindDevice, $pText){
		echo '<form action="">
			  <div class="box">
			  <h1>' . $pText . '</h1>
			  <br />
			  <table border="0">
			  <tr><td>';
		
		DisplayCompare::displayColumn($pListOfDevice, $pKindDevice, "1");
		
		echo '</td><td>';
		
		DisplayCompare::displayColumn($pListOfDevice, $pKindDevice, "0");
		
		echo '</td></tr>';
	}
	
	private static function displayColumn($pList, $pKindDevice, $pFirst){
		echo '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		  <select class="defaultText" name="users" onchange="showXmlDevice(this.value, \'' . $pKindDevice. '\', \'' . $pFirst . '\')">
		  <option value=\'\'>Proszę wybrać coś z listy</option>';
	
		foreach($pList as $id => $name)
			echo '<option value=\'' . $id . '\'> ' . $name . '</option>';
	
		echo '</select>';
	}
}

?>